9. 天气接入

9.1 设置天气remote view
/**
 * 设置天气remote view
 */
AiWeather.getInstance().setWeatherRemoteViewImpl(AbsWeatherRemoteView)

/**
 * 天气view
 */
public abstract class AbsWeatherRemoteView {

    /**
     * 显示查询到的天气
     *
     * @param beans 天气数据(最后一个数据数据为查询数据,比如查询明天深圳的天气,第八个数据为明天深圳的天气,
     *                      前七个数据是从今天起未来7天的天气,第一个数据中有未来一小时的天气数据)
     */
    public void showWeather(List<Weather> beans) {
}

public class Weather implements Parcelable {

        // 日期
        private String date;

        // 风向
        private String wind;

        // 温度
        private String temperature;

        // 查询城市
        private String city;

        // 天气
        private String weather;

        // 空气质量
        private String airIndex;

        // 未来一小时温度
        private String forecastTemperature;
}

results matching ""

    No results matching ""